<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="Responsive Web UI Kit &amp; Dashboard Template based on Bootstrap">
    <meta name="author" content="AdminKit">
    <meta name="keywords" content="adminkit, bootstrap, web ui kit, dashboard template, admin template">

    <link rel="shortcut icon" href="img/icons/icon-48x48.png"/>

    <title>部门编辑</title>

    <link href="${pageContext.request.contextPath}/css/app.css" rel="stylesheet">
</head>

<body>
<div class="wrapper">
    <%@include file="../icn/sidebar.jsp" %>
    <div class="main">
        <%@include file="../icn/head.jsp" %>
        <main class="content">
            <div class="container-fluid p-0">
                <h1 class="h3 mb-3" style="margin-left: 100px;font-weight: bold">部门编辑</h1>
                <div class="row" style="margin-left: 100px">
                    <div class="col-12 col-xl-10">
                        <div class="card">
                            <div class="card-body">
                                <form action="${pageContext.request.contextPath}/system/dept/deptEdit/${dept.id}"
                                      method="post" enctype="multipart/form-data">
                                    <div class="form-row ">
                                        <div class="form-group col-md-6">
                                            <label>部门名</label>
                                            <input type="text" name="name" class="form-control" value="${dept.name}" placeholder="请输入部门名">
                                            <%--<select class="form-control" name="name">
                                                <option value="${deptList}">${deptList}</option>
                                            </select>--%>
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label>图标</label>
                                            <img src="${dept.icon}" style="height: 25px;width: 25px">
                                            <input type="file" name="file" value="${dept.icon}" class="form-control">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label>别名</label>
                                            <input type="text" name="otherName" value="${dept.otherName}" class="form-control" placeholder="请输入别名">
                                        </div>
                                        <%--<div class="form-group col-md-6">
                                            <label>创建时间</label>
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <input type="text" class="form-control " id="mark"
                                                           value="${dept.createTime}" placeholder="系统自动生成"
                                                           name="createTime">
                                                    &lt;%&ndash;<fmt:formatDate value="${dept.createTime}" pattern="yyyy-MM-dd"/>&ndash;%&gt;
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label>修改时间</label>
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <input type="text" class="form-control " id="mark"
                                                           value="${dept.updateTime}" placeholder="系统自动生成"
                                                           name="createTime">
                                                    &lt;%&ndash;<fmt:formatDate value="${dept.createTime}" pattern="yyyy-MM-dd"/>&ndash;%&gt;
                                                </div>
                                            </div>
                                        </div>--%>
                                    </div>
                                    <div style="text-align: center">
                                        <button type="submit" class="btn btn-primary">提交</button>
                                        <button type="text" class="btn btn-secondary"><a
                                                href="${pageContext.request.contextPath}/system/dept/deptList"
                                                style="color: white;text-decoration: none">返回</a></button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>

    </div>
</div>

<script src="${pageContext.request.contextPath}/js/vendor.js"></script>
<script src="${pageContext.request.contextPath}/js/app.js"></script>

</body>

</html>